﻿@model IEnumerable<Everynet.SubHardware>
@{
    ViewBag.Title = "subHardware";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
             <br />
<u class="headerColor">Sub Hardware</u>
<p>
   
    @Html.ActionLink("Dashboard", "Dashboard", "Admin")
</p>
@using (Html.BeginForm())
{    
    <p>
        Name: @Html.TextBox("SearchString")&nbsp;&nbsp;
        <input type="submit" value="Filter" /></p> 
}
@if (TempData["message"] != null)
{
    <div class="text-success">
        @TempData["message"]
    </div>
}
<table class="table-data" cellpadding="0" cellspacing="0" border="0" width="100%">
    <thead>
        <tr>
            <th align="left" class="header">
                ID
            </th>
            <th align="left" class="header">
                Name
            </th>
            <th align="left" class="header">
                Detail
            </th>
            <th align="left" class="header">
                Price
            </th>
            <th align="left" class="header">
                HardwareID
            </th>
             <th align="left" class="header">
                Agreement
            </th>
            <th>
            Public Visible
            </th>
            <th>
            </th>
            <th>
            </th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.SubHardwareID)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SubHardwareName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SubHardwareDetail)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.SubHardwarePrice)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.HardwareID)
                </td>
                <td>
                     @Html.Raw(item.Agreement)
                </td>
                <td>
                @((item.VisiblePublic == null) ? "No" : (item.VisiblePublic == true) ? "Yes" : "No")
                </td>
                <td>@Html.ActionLink("Edit", "EditSubHardware", new { id = item.SubHardwareID })
                </td>
                
            </tr>
        }
    </tbody>
</table>
<script src="@Url.Content("~/Scripts/TableSort.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/tablepaging.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/admin/common.js")" type="text/javascript"></script>

